package com.hua.demo02;
//实现runnabel接口
public class MyRunnable implements Runnable {
    @Override
    public void run() {
        //线程提
        for (int i = 0; i < 200; i++) {
            System.out.println("我在看代码---"+i);
        }
    }

    public static void main(String[] args) {
        //创建runnable接口实现类对象
        MyRunnable runnable = new MyRunnable();
        //这是代理，通过线程对象来开启我们的线程
        Thread t1 = new Thread(runnable);
        t1.start();
//        for (int i = 0; i < 200; i++) {
//            System.out.println("我在学习多线程:-----"+i);
//        }
    }
}
